FOUR-31145: Self Service tasks not visible to users in assigned subgroups - #9022
rodriquelca wants to merge 5 commits into
Conversation
|
QA server K8S was successfully deployed https://ci-56d7fe3332.engk8s.processmaker.net |
| ->all(); | ||
|
|
||
| $queue = []; | ||
| foreach ($parents as $parentId) { |
There was a problem hiding this comment.
@rodriquelca Could changing this foreach to a while loop cause any performance issues? Could you analyze it and also check what happens if a group has a recursive assignment?
There was a problem hiding this comment.
@rodriquelca consider to add a test with circular reference of groups:
Group0 -> Group1 -> Group0
Seems the code covers it but please include it in a test
caleeli
left a comment
There was a problem hiding this comment.
Add a test according to the previous comment (circular references)
PR SummaryMedium Risk Overview Adds a 10-minute per-user cache for those IDs, with invalidation when user–group links change ( Also fixes Reviewed by Cursor Bugbot for commit dc48f80. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2e362d7. Configure here.
|
|
QA server K8S was successfully deployed https://ci-56d7fe3332.engk8s.processmaker.net |






Issue & Reproduction Steps
A Self Service task assigned to group Main does not show for a user who is only in subgroup Sub (Sub ∈ Main). Inbox/claim compared the token’s self_service_groups to the user’s direct groups only.
The task list also broke: exclude() used $this->table (null) and generated SELECT
.id, so the API returned 422 and the tab looked empty.Repro: Homero in Sub → Sub in Main → process Self Service assigned to Main → login as Homero → Tasks → Self Service. List is empty; claim fails. To Do empty until claim is expected.
Solution
self.services.mov
How to Test
Run the unit test
./vendor/bin/phpunit tests/Feature/SelfServiceSubgroupTest.php
Related Tickets & Packages
https://processmaker.atlassian.net/browse/FOUR-31145
Code Review Checklist
ci:deploy